package com.wuchao.controller;


import com.wuchao.response.R;
import com.wuchao.service.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 菜单表 前端控制器
 * </p>
 *
 * @author wuchao
 * @since 2023-12-12
 */
@RestController
@RequestMapping("/menu")
@Api("菜单111")
@CrossOrigin
@RequiredArgsConstructor
public class MenuController {
    final MenuService menuService;
    //    @Resource
//    private MenuService   menuService;
    @ApiOperation("zhao到菜单树")
    @GetMapping("findMenuTree")
    public R findMenuTree(){
        return R.ok().data("menutree",menuService.findMenuTree()) ;
    }
}

